package com.gs.process.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gs.process.model.Approval;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author gs
 * @date create in 2020/12/11 16:27
 */
@Repository
public interface ApprovalMapper extends BaseMapper<Approval> {

    IPage<Approval> selectPageByRole(IPage<Approval> page, @Param("role") String role, @Param("deptId") Long deptId, @Param("appoint") Long appoint);

    List<Approval> selectListByRole(@Param("role") String role, @Param("deptId") Long deptId, @Param("appoint") Long appoint);

    IPage<Approval> selectPageByUser(IPage<Approval> page, @Param("userId") Long userId);

    List<Approval> selectListByUser(@Param("userId") Long userId);

    IPage<Approval> selectPage();

    List<Approval> selectList();

    Approval selectById(Long sid);
}
